package org.jeecg.modules.bid.vo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecg.modules.file.entity.ProcurementFile;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
@ApiModel(value = "BidSubmitVO", description = "投标提交信息")
public class BidSubmitVO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    private String id;

    @ApiModelProperty(value = "采购方案ID")
    @NotBlank(message = "采购方案ID不能为空")
    @Column(name = "purchase_id")
    private String purchaseId;//√ ,项目类目，项目简述，项目联系人，联系电话，方案类型,工程名称，报名截止时间

    @ApiModelProperty(value = "供应商ID")
    @NotBlank(message = "供应商ID不能为空")
    private String supplierId;

    @ApiModelProperty(value = "公司名称")
    @NotBlank(message = "公司名称不能为空")
    private String companyName;

    @ApiModelProperty(value = "抽签ID")
    @NotBlank(message = "抽签id不为空")
    @Column(name = "lottery_Id")
    private String lotteryId;

    @ApiModelProperty(value = "项目名称")
    @Column(name = "project_name")
    private String projectName;

    @ApiModelProperty(value = "投标状态:0-未报价，1-已报价，2-已报名,3-放弃报名,4-已完成")
    @Dict(dicCode = "bid_status")
    @Column(name = "bid_status")
    private String bidStatus = "0";

    @ApiModelProperty(value = "投标价格")
    @NotNull(message = "投标价格不能为空")
    private BigDecimal bidPrice;//√


    @ApiModelProperty(value = "投标说明")
    private String bidDescription;//√

    @ApiModelProperty(value = "联系人")
    private String contactPerson;

    @ApiModelProperty(value = "联系电话")
    private String contactPhone;

    @ApiModelProperty(value = "创建人")
    @Column(name = "create_by")
    private String createBy;

    @ApiModelProperty(value = "创建日期")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    @Column(name = "create_time")
    private Date createTime;

    @ApiModelProperty(value = "投标文件")
    private List<ProcurementFile> bidDocument;//√
}
